package com.sh.data.engine.application.model.dto.integration;

import com.sh.data.engine.repository.dao.base.EngineBaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import java.util.Date;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/27 17:18
 */
@Data
@Schema
@Builder(toBuilder = true)
public class TaskRecordDTO extends EngineBaseModel<TaskRecordDTO> {

    @Schema(description = "任务id")
    private Long offlineSyncId;

    /**
     * 任务名称
     */
    @Schema(description = "任务名称")
    private String taskName;

    @Schema(description = "执行类型 0-自动 1-手动")
    private Integer executeType;

    @Schema(description = "任务状态 3-未运行 4-运行中 5-成功 6-失败 7-停止")
    private Integer taskStatus;

    @Schema(description = "开始时间")
    private Date startTime;

    @Schema(description = "结束时间")
    private Date endTime;

    @Schema(description = "执行时常")
    private Long duration;

    @Schema(description = "执行日志id")
    private Long jobLogId; // 执行日志id

    @Schema(description = "来源表")
    private String sourceTable;

    @Schema(description = "目标表")
    private String targetTable;

    @Schema(description = "创建人")
    private String creator;

    private Integer ignored;

    @Tolerate
    public TaskRecordDTO() {
    }
}
